
function logout(){
			top.location.href='../controls/logout.php';
		}


var XMLHttpRequestObject=false;
if(window.XMLHttpRequest)
{
	XMLHttpRequestObject=new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
	XMLHttpRequestObject=new ActiveXObject("Microsoft.XMLHTTP");
}

//通过ajax获取信息，地址为dataSource，获取内容在divID中，传输数据位data
function getmessage(dataSource,divID,data)
{
	if(XMLHttpRequestObject)
	{
		var obj=document.getElementById(divID);
		XMLHttpRequestObject.open("POST",dataSource,true);
		XMLHttpRequestObject.setRequestHeader("Content-Type","application/x-www-form-urlencoded");  
		XMLHttpRequestObject.send("data="+data);
		XMLHttpRequestObject.onreadystatechange=function ()
		{
			if(XMLHttpRequestObject.readyState==4&&XMLHttpRequestObject.status==200)
			{
				obj.innerHTML=XMLHttpRequestObject.responseText;
			}
			else
			{
				obj.innerHTML="正在获取信息中……";
			}
		}
		
	}
}
function change_style(stylenum){
	$("#button1").css("border-bottom"," solid 2px rgba(0,0,0,0)");
	$("#button2").css("border-bottom"," solid 2px rgba(0,0,0,0)");
	if(stylenum==1){
		var buttonid="#button1";
	}
	else{
		var buttonid="#button2";
	}
	$(buttonid).css("border-bottom"," solid 2px rgba(255,255,0,0.4)");
	
	//$("#main").css("box-shadow","-1px 0px 5px 0.1px #e17807 inset");
}